<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>欢迎页面-L-admin1.0</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <link rel="stylesheet" href="/cms/css/font.css">
  <link rel="stylesheet" href="/cms/css/xadmin.css">
  <link rel="stylesheet" href="/cms/layui/css/layui.css">
  <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
  <!--[if lt IE 9]>
  <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>

<body class="form-wrap">

<div class="layui-fluid">
  <div class="layui-row layui-col-space15">

    <div class="layui-col-md12">
      <div class="layui-card">
        <div class="layui-card-header">科室信息</div>
        <div class="layui-card-body">
          <form id="myForm" method="post" class="layui-form white-bg radius">

            <div class="layui-form-item">
              <label class="layui-form-label">科室名称</label>
              <div class="layui-input-block">
                <input type="text" class="layui-input"  lay-verify="required" name="name" >
              </div>
            </div>

            <div class="layui-form-item">
              <label class="layui-form-label">科室电话</label>
              <div class="layui-input-block">
                <input type="text" class="layui-input"  lay-verify="required" name="tel">
              </div>
            </div>


            <div class="layui-form-item">
              <label class="layui-form-label">科室简介</label>
              <div class="layui-input-block">
                <input type="text" class="layui-input"  lay-verify="required" name="shotDesc">
              </div>
            </div>



            <div class="layui-form-item">
              <label class="layui-form-label">科室状态：</label>

              <div class="layui-input-block" >

                  <input type="radio"  name="status" checked="checked"   value="1" title="启用中">
                  <input type="radio" name="status" value="2" title="禁用中">
                </div>
            </div>



            <div class="layui-form-item">
              <label class="layui-form-label">重点科室：</label>

              <div class="layui-input-block" >

                  <input type="radio"  name="importKeshi" checked="checked" value="1" title="是">
                  <input type="radio" name="importKeshi" value="2" title="否">
              </div>
            </div>




            <div class="layui-form-item">
              <label class="layui-form-label">科室缩略图：</label>
              <div>
                <input type="radio"  name="shortImg" checked="checked"  value="pic_007.png" title="呼吸科">
                <img src="/reception/images/pic_007.png" style="background-color: #6bcbca" height="80" width="80"/>
                <input type="radio"  name="shortImg" value="pic_008.png" title="内分泌科">
                <img src="/reception/images/pic_008.png" style="background-color: #6bcbca" height="80" width="80"/>

                <input type="radio"  name="shortImg" value="pic_009.png" title="神经科">
                <img src="/reception/images/pic_009.png" style="background-color: #6bcbca" height="80" width="80"/>

                <input type="radio"  name="shortImg" value="pic_010.png" title="心内科">
                <img src="/reception/images/pic_010.png" style="background-color: #6bcbca" height="80" width="80"/>


                <input type="radio"  name="shortImg" value="pic_011.png" title="眼科">
                <img src="/reception/images/pic_011.png" style="background-color: #6bcbca" height="80" width="80"/>

                <input type="radio"  name="shortImg" value="pic_012.png" title="神经内科">
                <img src="/reception/images/pic_012.png" style="background-color: #6bcbca" height="80" width="80"/>

                <input type="radio"  name="shortImg" value="pic_013.png" title="肾内科">
                <img src="/reception/images/pic_013.png" style="background-color: #6bcbca" height="80" width="80"/>

              </div>

            </div>




            <div class="layui-form-item">
              <label class="layui-form-label">科室详细</label>
              <div class="layui-input-block">
                <textarea id="lay_edit" lay-verify="content" name = "description"></textarea>

              </div>
            </div>

            <div class="layui-form-item">
              <div class="layui-input-block">
                <button type="submit" lay-submit="" class="layui-btn" style="width: 150px" lay-filter="formSubmit" >保存</button>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>

<script type="text/javascript" src="/js/jquery.min.js"></script>
<script src="/cms/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="/cms/js/xadmin.js"></script>
<script>
  layui.use(['layedit', 'form'], function(){
    var form = layui.form;
    var layedit = layui.layedit;
    layedit.set({	//设置图片接口
      uploadImage: {
        url: '/file/uploads', //接口url
        type: 'post'
      }
    });
    //创建一个编辑器
    var index = layedit.build('lay_edit',{
      height: 350
    });
    //提交时把值同步到文本域中
    form.verify({
      //content富文本域中的lay-verify值
      content: function(value) {
        return layedit.sync(index);
      }
    });

    form.on("submit(formSubmit)", function (data) {
      $.post("/cms/keshi/save", data.field, function(result){
        layer.msg(result.msg);
      });
      return false;
    })
  });
</script>
</body>


</html>